package com.zan.ojstudy.zanojcodesandbox.docker;

import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.*;
import com.github.dockerjava.api.model.Container;
import com.github.dockerjava.api.model.Frame;
import com.github.dockerjava.api.model.PullResponseItem;
import com.github.dockerjava.core.DockerClientBuilder;
import com.github.dockerjava.core.command.LogContainerResultCallback;

import java.util.List;

/**
 * @Author : Zan
 * @Create : 2024/6/3 12:04
 * @ClassName : DockerDemo
 * @Description : TODO 请用一句话描述该类的功能
 */
public class DockerDemo2 {
    public static void main(String[] args) throws InterruptedException {
        // 获取默认的 Docker Client
        DockerClient dockerClient = DockerClientBuilder.getInstance().build();
        // ping docker 是否能跑通
        PingCmd pingCmd = dockerClient.pingCmd();
        pingCmd.exec();

    }
}
